<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>历史工资</title>
<LINK href="style/css.css" type="text/css" rel="stylesheet">
</head>
<body>
 <center>
 <table align="center" width="80%" border="0">
 	<tr>
	     <td colspan="16" class="STYLE4" align="center" bgcolor="#ffffff" colspan="2" height="40">历史工资查询(${year }年${month }月)
	     </td>
	</tr>
 	<tr><td>
		<table class="tableline" id="Table1" cellspacing="1" cellpadding="0" width="100%" border="0">
		      <tr>
		     <td colspan="16"  align="center" bgcolor="#ffffff" height="40">
				<c:if test="${!empty itemList}">
					<c:forEach items="${itemList}" var="item">
			        <a href="salaryQuery.do?method=queryCurrentSalary&salaryItemId=${item.id }">${item.name }</a>&nbsp;&nbsp;
			         </c:forEach>
		    	</c:if>
		    	<c:if test="${empty itemList}">
		    		当前查询的月份没有工资数据
		    	</c:if>
		     </td>
		     </tr>
		    <tr align="center">
		   	  <c:if test="${empty salaryDetailList}">
			      <td height="40" bgcolor="#ffffff">姓名</td>
			      <td bgcolor="#ffffff">年月</td>
			      <td bgcolor="#ffffff">总额</td>
			      <c:forEach items="${itemList}" var="item">
		      		<td bgcolor="#ffffff">${item.name }</td>
		      	  </c:forEach>
			  </c:if>
		      <c:if test="${!empty salaryDetailList}">
		      	<c:forEach items="${salaryDetailList}" var="salaryDetail">
		      		<td height="40"  bgcolor="#ffffff">${salaryDetail.name }</td>
		      	</c:forEach>
		      </c:if>
		    </tr>
		    <tr align="center">
		    	<c:if test="${empty salaryDetailList}">
			      <td bgcolor="#ffffff">${user.username }</td>
			      <td bgcolor="#ffffff">${salary.year }:${salary.month }</td>
			      <td bgcolor="#ffffff">${salary.total }</td>
			      <c:forEach items="${itemList}" var="item">
		      		<td bgcolor="#ffffff">${item.total }</td>
		      	  </c:forEach>
			    </c:if>
		      <c:if test="${!empty salaryDetailList}">
		      	<c:forEach items="${salaryDetailList}" var="salaryDetail">
		      		<td bgcolor="#ffffff">${salaryDetail.amount }</td>
		      	</c:forEach>
		      </c:if>
		    </tr>
		  </table>
	</td></tr>
</table>	  
</center>
</body>
</html>